package com.xsd.vistor.kpiDemo;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description: 员工对象管理者
 * @Author: zhoufuzong
 * @Created: 2021-03-11 21:02:12
 * @Version: 1.1.0
 */

public class StaffStructure {

    private List<Staff> staffList = new ArrayList<>();

    public void add(Staff staff){
        staffList.add(staff);
    }

    public void printInfo(Vistor vistor){

        for (Staff staff : staffList) {
            staff.accept(vistor);
        }
    }
}
